package homework35;

public class Manager extends LeaveApproval{

    public Manager(String name){
        super(name);
    }

    @Override
    public void hardLeave(Leave left) {
        if (left.getLeaveDays() >= 3 && left.getLeaveDays()<10){
            System.out.println( name  + "批准员工"
                    + left.getLeavePerson() + "休息" + left.getLeaveDays() + "天");
        }else {
            if (this.successor != null){
                this.successor.hardLeave(left);
            }
        }
    }
}
